import service from "@/utils/fetch";
const post = {
  //查询优惠券分页
  coupon_list (params) {
    return service({
      method: "get",
      params,
      url: "/api/coupon/",
    });
  },

  //新增优惠券
  coupon_add(params) {
    return service({
      method: "post",
      data: params,
      url: "/api/coupon/",
    });
  },
  
  //查询优惠券详情
  coupon_detail(id) {
    return service({
      method: "get",
      url: `/api/coupon/${id}`,
    });
  },

  //   优惠券：停用
  coupon_disable(id) {
    return service({
      method: "post",
      url: `/api/coupon/disable/${id}`,
    });
  },
};

export default post;
